package com.leyou.item.service;

import com.leyou.common.vo.PageResult;
import com.leyou.item.dto.SkuDTO;
import com.leyou.item.dto.SpuDTO;
import com.leyou.item.dto.SpuDetailDTO;

import java.util.List;
import java.util.Map;

public interface IGoodsService {

    PageResult<SpuDTO> querySpuByPage(String key, Boolean saleable, Integer page, Integer rows);

    void saveGoods(SpuDTO spuDTO);

    void putGoods(Long id, Boolean saleable);

    SpuDetailDTO querySpuDetailById(Long id);

    List<SkuDTO> querySkuById(Long id);

    void updateGoods(SpuDTO spuDTO);

    SpuDTO querySpuById(Long spuId);

    List<SkuDTO> querySkuListByIds(List<Long> ids);

    void minusStock(Map<Long, Integer> cartMap);
}
